import Index_manage from '../components/manage/index.vue'
import project from './project';
import Protage from './protage';
import Daycost from './daycos';
import propcost from './propcost';
import Util from '../components/util.vue'
import FirstPage from '../components/firstpage.vue';


//访客
import Addvisitor from '../components/manage/visitor/addvisitor.vue'
import Showvisitor from '../components/manage/visitor/showvisitor.vue'
import Updatavisitor from '../components/manage/visitor/updatavisitor.vue'
import Visitorhead from '../components/manage/visitor/visitorhead.vue'

//业主
import Addowner from '../components/manage/mom/addowner.vue'
import Showowner from '../components/manage/mom/showowner.vue'
import Updataowner from '../components/manage/mom/updataowner.vue'
import Ownerindex from '../components/manage/mom/ownerindex.vue'
import Ownerhead from '../components/manage/mom/ownerhead.vue'
import Ownerparking from '../components/manage/mom/ownerparking.vue'
import Batchowner from '../components/manage/mom/batchowner.vue';

//工人
import Addworker from '../components/manage/worker/addworker.vue'
import Showworker from '../components/manage/worker/showworker.vue'
import Updataworker from '../components/manage/worker/updataworker.vue'
import Workerindex from '../components/manage/worker/workerindex.vue'
import Workerhead from '../components/manage//worker/workerhead.vue'
import Batchworker from '../components/manage/worker/batchworker.vue';

//管理员
import Addmanager from '../components/manage/manager/addmanager.vue'
import Showmanager from '../components/manage/manager/showmanager.vue'
import Updatamanager from '../components/manage/manager/updatamanager.vue'
import Managerindex from '../components/manage/manager/managerindex.vue'
import Managerhead from '../components/manage/manager/managerhead.vue'
import Batchmanager from '../components/manage/manager/batchmanager.vue';

//信息
import Messagehead from '../components/manage/message/messagehead.vue';
import Showmessage from '../components/manage/message/showmessage.vue';
import Addmessage from '../components/manage/message/addmessage.vue';
import Updatamessage from '../components/manage/message/updatamessage.vue'




export default {
    routes: [
        {
            //首页
            path: '/index_manager',
            component: Index_manage,
            redirect:'/index_manager/page',
            meta: { requiresAuth: true },//路由守卫
            children: [
                {
                    path:'page',
                    component:FirstPage
                },
                {
                    //查询跳转页面
                    path: 'util',
                    component: Util
                },

                {
                    //访客导航头
                    path: 'visitorhead',
                    component: Visitorhead,
                    redirect: 'visitorhead/showvisitor',
                    children: [
                        {
                            //显示访客
                            path: 'showvisitor',
                            component: Showvisitor
                        },
                    ]
                }, {
                    //添加访客
                    path: 'addvisitor',
                    component: Addvisitor
                }, {
                    //修改访客信息
                    path: 'updatavisitor',
                    component: Updatavisitor
                }, {
                    //业主导航头
                    path: 'ownerhead',
                    component: Ownerhead,
                    redirect: 'ownerhead/showowner',
                    children: [
                        {
                            //显示业主
                            path: 'showowner',
                            component: Showowner
                        },
                    ]
                }, {
                    //修改业主信息
                    path: 'updataowner',
                    component: Updataowner
                },
                {
                    //添加停车信息
                    path: 'ownerparking',
                    component: Ownerparking
                },
                {
                    //添加业主导航页面
                    path: 'ownerindex',
                    component: Ownerindex,
                    redirect: 'ownerindex/addowner',
                    children: [
                        {
                            //添加业主
                            path: 'addowner',
                            component: Addowner
                        }, {
                            path: 'batchowner',
                            component: Batchowner
                        }
                    ]
                }, {
                    //工人导航头
                    path: 'workerhead',
                    // name:'keyword',
                    component: Workerhead,
                    redirect: 'workerhead/showworker',
                    children: [
                        {
                            //显示工人
                            path: 'showworker',
                            // name:'keyword',
                            component: Showworker
                        },
                    ]
                }, {
                    //更新工人信息
                    path: 'updataworker',
                    component: Updataworker
                }, {
                    //显示工人导航
                    path: 'workerindex',
                    component: Workerindex,
                    redirect: 'workerindex/addworker',
                    children: [
                        {
                            //添加工人
                            path: 'addworker',
                            component: Addworker
                        }, {
                            path: 'batchworker',
                            component: Batchworker
                        }
                    ]
                }, {
                    //管理员列表头
                    path: 'managerhead',
                    component: Managerhead,
                    redirect: 'managerhead/showmanager',
                    children: [
                        {
                            //显示管理员
                            path: 'showmanager',
                            component: Showmanager
                        },
                    ]
                }, {
                    //修改管理员信息
                    path: 'updatamanager',
                    component: Updatamanager
                }, {
                    //管理员导航
                    path: 'managerindex',
                    component: Managerindex,
                    redirect: 'managerindex/addmanager',
                    children: [
                        {
                            //添加管理员
                            path: 'addmanager',
                            component: Addmanager
                        }, {
                            //批量添加
                            path: 'batchmanager',
                            component: Batchmanager
                        }
                    ]
                }, {
                    //信息导航
                    path: 'messagehead',
                    component: Messagehead,
                    redirect: 'messagehead/showmessage',
                    children: [

                        {//显示信息
                            path: 'showmessage',
                            component: Showmessage
                        }
                    ]
                }, {
                    //添加信息
                    path: 'addmessage',
                    component: Addmessage
                }, {
                    //更新信息
                    path: 'updatamessage',
                    component: Updatamessage
                },
                //项目管理
                ...project.routes,
                //物业标识与费用
                ...Protage.routes,
                //录入费用
                ...Daycost.routes,
                //物业费收缴
                ...propcost.routes
            ]

        }
    ]
}